package com.ccsc.auth.service;

import com.ccsc.auth.entity.Department;
import com.ccsc.auth.entity.Position;
import com.ccsc.auth.utils.DataMap;
import com.ccsc.auth.utils.Page;
import javafx.geometry.Pos;

import java.util.List;
import java.util.Map;

/**
 * 职位service
 * Created by yyangs on 2017/2/10.
 */
public interface PositionService {

    List<Position> getAllPositions() throws Exception;       						                                    //获取全部职位列表
    List<Map<Department,Position>> getDepartmentAndPositionsByUserId(Integer userId) throws Exception;                  //根据用户id查询部门职位列表
    List<Position> getPositionsByStatus(Integer Status) throws Exception;   			                                //根据职位状态查职位列表
    List<Position> getPositionsByName(String name) throws Exception;   			                                        //根据职位名称查职位列表
    List<Position> getPositionsByDepartmentId(Integer depertmentId) throws Exception;                                   //根据部门id查询该部门下职位
    List<Position> getPositionsByParentPositionId(Integer parentPositionId) throws Exception;                  //根据某一职位id查询下级所有职位
    Position getDepartmentAndPosition(Position position) throws Exception;   						                   //根据职位ID查职位信息

    Page getPositionsByPage(DataMap params) throws Exception;					                                        //分页并根据条件查询职位列表
    Page getPositionsByPage(Position position,DataMap params) throws Exception;					                                        //分页并根据条件查询职位列表
    Position getPositionById(Integer id) throws Exception;   						                                    //根据职位ID查职位信息

    Integer createPosition(Position position) throws Exception;  					        	                        //添加职位
    Integer updatePosition(Position position) throws Exception;   		   		            	                        //修改职位
    Integer deletePositionById(Integer id) throws Exception; 					                                        //删除职位

    Integer createDepartmentAndPosition(Position position) throws Exception;  					        	                        //添加职位
    Integer updateDepartmentAndPosition(Position position) throws Exception;   		   		            	                        //修改职位
    Integer deleteDepartmentAndPosition(Integer departmentId,Integer positionId) throws Exception; 					                                        //删除职位

    Integer activePosition(Integer id) throws Exception;							                                    //激活职位
    Integer withdrawPosition(Integer id) throws Exception;						                                        //注销职位
    Integer batchActivePosition(List<Integer> ids) throws Exception;				                                    //批量激活职位
    Integer batchWithdrawPosition(List<Integer> ids) throws Exception;			                    	                //批量注销职位
}
